﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="subClient.aspx.cs" Inherits="famails.BackEnd.page.subClient" MasterPageFile="~/Master.Master" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<div style="width:100%;padding:10px;">

    <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="border:1px solid #333;padding:0px;margin-bottom:10px;">
        <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="padding:10px 20px;background:#000;color:#fff;font-size:18px;font-weight:bold;position:relative;">   
            Quản lý tài khoản con
        </div>
		<asp:HiddenField ID="hdfUserId" runat="server" /> 
        <asp:HiddenField ID="hdfId" runat="server" /> 
        <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="height: auto;padding:10px;">
			  <asp:Panel Visible="false" ID="pnError" runat="server">
                <div class="error-box round">
                    <asp:Label ID="lblError"  runat="server" Text=""></asp:Label> 
                </div>
              </asp:Panel>
              <asp:Panel Visible="false" ID="pnSuccess" runat="server">
                <div class="confirmation-box round">
                    <asp:Label ID="lblSuccess"  runat="server" Text=""></asp:Label> 
                </div>
              </asp:Panel>
        </div>
        <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="height: auto;padding:0px;">
        <div class="col-md-6 col-xs-12 col-sm-6 col-lg-6" style="height: auto;padding:10px;">
            <fieldset>
                <p>
                    <label for="simple-input" style="font-weight: bolder; text-transform: none">
                        Tên tài khoản</label>
                    <asp:TextBox ID="txtUsername" CssClass="form-control" style="border:1px solid #333;border-radius:0px;" 
                        runat="server"></asp:TextBox>
                    <em>Tên tài khoản con!</em>
                </p>
            </fieldset>
        </div>
        <div class="col-md-6 col-xs-12 col-sm-6 col-lg-6" style="height: auto;padding:10px;">
            <fieldset>
                <p>
                    <label for="simple-input" style="font-weight: bolder; text-transform: none">
                        Email</label>
                    <asp:TextBox ID="txtEmail" CssClass="form-control" style="border:1px solid #333;border-radius:0px;margin-bottom:10px;" 
                        runat="server"></asp:TextBox>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtEmail"
                                    Display="Dynamic" ErrorMessage="Email không hợp lệ" ValidationExpression="^([\w\.\-]+)@([\w\-]+)((\.(\w){2,3})+)$"
                                    ValidationGroup="CheckInput_Email"></asp:RegularExpressionValidator>
                </p>
            </fieldset>
        </div>
        </div>
        <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="height: auto;padding:0px;">
        <div class="col-md-6 col-xs-12 col-sm-6 col-lg-6" style="height: auto;padding:10px;">
            <fieldset>
                <p>
                    <label for="simple-input" style="font-weight: bolder; text-transform: none">
                        Mật khẩu</label>
                    <asp:TextBox ID="txtPassword" TextMode="Password" CssClass="form-control" style="border:1px solid #333;border-radius:0px;" 
                        runat="server"></asp:TextBox>
                    <em>Mật khẩu tài khoản con</em>
                </p>
            </fieldset>
        </div>
        <div class="col-md-6 col-xs-12 col-sm-6 col-lg-6" style="height: auto;padding:10px;">
            <fieldset>
                <p>
                    <label for="simple-input" style="font-weight: bolder; text-transform: none">
                        Xác nhận mật khẩu</label>
                    <asp:TextBox ID="txtRePassword" TextMode="Password"  CssClass="form-control" style="border:1px solid #333;border-radius:0px;" 
                        runat="server"></asp:TextBox>
                    <em>Điền lại thông tin mật khẩu</em>
                </p>
            </fieldset>
        </div>
        </div>
    <style>
        #ContentPlaceHolder1_chkBlock {
        height:20px;
        width:20px;
        margin-right:0px;
        margin-top:6px;
    }
    </style>

        <div class="col-md-6 col-xs-12 col-sm-6 col-lg-6" style="height: auto;padding:10px;">
            <fieldset>
                <p>
                    <label for="simple-input" style="font-weight: bolder;padding-top: 7px;
margin-right: 10px; float:left; text-transform: none">
                        Khóa</label>
                    <asp:CheckBox ID="chkBlock" style="float:left;" runat="server"/>
                </p>
            </fieldset>
        </div>
        <div class="col-md-6 col-xs-12 col-sm-6 col-lg-6" style="height: auto;padding:10px;">
            <fieldset>
                <p>
                        <button ValidationGroup="CheckInput_Email" runat="server" class="btn" style="float:left;margin-right:10px;background:#333;color:#fff;text-align:center;padding:6px 15px;border-radius:0px;" 
                            onserverclick="btnSave_Click">
                            <i style="margin-right:10px;" class="fa fa-save"></i> Lưu
                        </button>
                        <button runat="server" class="btn" style="float:left;margin-right:10px;background:#333;color:#fff;text-align:center;padding:6px 15px;border-radius:0px;" 
                            onserverclick="btnRefesh_Click">
                            <i style="margin-right:10px;" class="fa fa-refresh"></i> Làm mới
                        </button>
                </p>
            </fieldset>
        </div>

        <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="padding:10px 20px;background:#000;color:#fff;font-size:18px;font-weight:bold;position:relative;">   
            Danh sách tài khoản con
        </div>
        <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="height: auto;padding:10px;">
                    <div class=" table-responsive">
                <table class="table table-striped table-bordered table-hover" id="dataTables-example">
                    <thead>
                        <tr>
                            <th style="width:50px;text-align:center;">#</th>
                            <th>Người dùng</th>
                            <th>Email</th>
                            <th>Trạng thái</th>
                            <th style="width:100px;">Tùy chỉnh</th>
                        </tr>
                    </thead>
                    <tbody>
                <asp:Repeater ID="dlMember" runat="server">
                        <ItemTemplate>
                        <tr>
                            <td style="width:50px;text-align:center;"><asp:Label ID="No" runat="server" ></asp:Label></td>
                            <td><asp:Label ID="clientName" runat="server" Text='<%# Eval("subName") %>'></asp:Label></td>
                            <td><asp:Label ID="lblEmail" runat="server" Text='<%# Eval("subEmail") %>'></asp:Label></td>
                            <td><asp:Label ID="lblStatus" runat="server" Text='<%# Eval("IsBlockText") %>'></asp:Label></td>
                            <td style="text-align:center;">
                                    <asp:ImageButton ID="btnEdit" runat="server" ImageUrl="../resource/images/edit-validated-icon.png"
                                            CommandArgument='<%# Eval("UserId") %>' OnClick="btnEdit_Click"  />
                                            <asp:ImageButton ID="btnDelete" runat="server" ImageUrl="../resource/images/Delete-icon.png"
                                                CommandArgument='<%# Eval("UserId") %>'
                                                    OnClientClick="return confirmDelete('Bạn có chắc rằng sẽ xóa thuộc tính này không ?')" OnClick="btnDelete_Click" /> 
                            </td>
                        </tr>     
                        </ItemTemplate>
                    </asp:Repeater>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>
</asp:Content>

